<?php


namespace App\Entity\Contest;


use App\Entity\BaseEntity;

/**
 * Class ContestDto
 * @package App\Entity\Contest
 * @property int $name
 * @property int $timeout
 * @property int $teamCount
 * @property int $teamSize
 * @property string $inviteCode
 * @property int $status 1未开始，2进行中，3已结束
 */
class ContestDto extends BaseEntity
{
    public function rules(): array
    {
        return [
            'name' => 'required',
            'teamCount' => 'required',
            'teamSize' => 'required',
            'timeout' => 'required',
        ];
    }

    public function messages(): array
    {
        return [
            'teamCount.required' => '队伍数量必填',
            'teamSize.required' => '队伍人数必填',
            'timeout.required' => '比赛时长必填',
        ];
    }
}